package com.fqgj.xjd.user.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.xjd.user.dao.UserAuthorizedCollectDao;
import com.fqgj.xjd.user.entity.UserAuthPanEntity;
import com.fqgj.xjd.user.entity.UserAuthorizedCollectEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: liuming
 * Date: 2019-06-27
 * Time: 15:54:39.141
 */

@Repository
public class UserAuthorizedCollectDaoImpl extends AbstractBaseMapper<UserAuthorizedCollectEntity> implements UserAuthorizedCollectDao {

    @Override
    public UserAuthorizedCollectEntity selectByUserCodeAndType(String userCode, Integer type) {
        Map<String, Object> params = new HashMap<>();
        params.put("userCode", userCode);
        params.put("type", type);
        return getSqlSession().selectOne(getStatement("selectByUserCodeAndType"), params);
    }

    @Override
    public List<UserAuthorizedCollectEntity> selectNeedHandleList(Map<String, Object> map) {
        return getSqlSession().selectList(getStatement("selectNeedHandleList"), map);
    }
}